package demo.hms.Room.contoller;

import demo.hms.Room.service.servicelmpl.RoomServicelmpl;
import demo.hms.mybatis.entity.Room;
import demo.hms.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController()
@RequestMapping("/room")
public class RoomController {
    @Resource
    private RoomServicelmpl service;

    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    public Result selectAll(String roomName){return service.selectAll(roomName);}
    @RequestMapping(value = "/insert", method = RequestMethod.GET)
    public Result insert(Room room){return service.insert(room);}
    @RequestMapping(value = "/update", method = RequestMethod.GET)
    public Result update(Room room){return service.update(room);}
    @RequestMapping(value = "/delete", method = RequestMethod.GET)
    public Result delete(String roomId){return service.delete(roomId);}

}
